﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using WindowsFormsTest.Public;

namespace WindowsFormsTest.Reserve
{
    public partial class ProductManager : MainTabUserContorl
    {


        string[][] initData = new string[][] { new string[] { "MSP4300", "TI", "2012-1-1 9:00", "陈静" }, new string[] { "PIC6700", "Microsoft", "2012-1-1 9:00", "陈静"}, new string[] {"MSP4300", "Microsoft" , "2012-1-1 9:00", "陈静" } };


        public ProductManager()
        {
            InitializeComponent();


            this.dataGridView1.Rows.Add();
            this.dataGridView1.Rows.Add();
            for (int i = 0; i < initData.Length; i++)
            {
                for (int j = 0; j < initData[0].Length; j++)
                {
                    this.dataGridView1.Rows[i].Cells[j].Value = initData[i][j];
                }

            }
        }
        public override void SetModel(WindowsFormsTest.Public.WindowModel modelType)
        {
            switch (modelType)
            {
                case WindowModel.MANAGER_SEARCH:
                    {
                        this.splitContainer2.Panel1Collapsed = true;

                        break;
                    }
                default:
                    {
                        break;
                    }
            }
        }
        public void setModel(ManagerModel modelType)
        {
            switch (modelType)
            {
                case ManagerModel.SEARCH:
                    {
                        this.splitContainer2.Panel1Collapsed = true;

                        break;
                    }
                default:
                    {
                        break;
                    }
            }
        }

        private void splitContainer2_Panel1_Paint(object sender, PaintEventArgs e)
        {

        }

        private void textBox2_TextChanged(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.splitContainer1.Panel2Collapsed = false;
        }

        private void button7_Click(object sender, EventArgs e)
        {
            this.splitContainer1.Panel2Collapsed = false;
        }

        private void button3_Click(object sender, EventArgs e)
        {
            this.splitContainer1.Panel2Collapsed = true;
        }
    }
}
